-
Notifications
You must be signed in to change notification settings - Fork 400
feat(smartctl): update for smartmontools 7.5 #1471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant "Request changes".
|
Just a note, I plan to release the next bash-completion version really soon, as soon as tomorrow (Oct 27). Would be nice to get this included in that release if we can get it merged in time (can also wait for a couple of more days if that's what it takes, but would rather not). |
|
Thanks for the info, will push a new version today. |
|
Done. Now always use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM basically.
completions/smartctl
Outdated
| # or similar bash_completion functionality would be required. | ||
| fmt='raw{8,16,48,56,64},hex{48,56,64},raw24/raw{24,32}' | ||
| fmt+=',msec24hour32,{sec,min,halfmin}2hour,temp10x,tempminmax' | ||
| _comp_compgen -P "${cur%%,*}," -- -W '{'"$fmt"'}{,\,,:}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Showing three variations for all of the possible values (16x3 or 19x3) may be too much. It would be tedious to select one in menu-complete. What do you think about the idea of showing the three variations only when the candidate is unique?
| _comp_compgen -P "${cur%%,*}," -- -W '{'"$fmt"'}{,\,,:}' | |
| _comp_compgen -P "${cur%%,*}," -- -W '{'"$fmt"'}' | |
| if ((${#COMPREPLY[@]} == 1)); then | |
| _comp_compgen -R -- -W '"$COMPREPLY"{,\,,:}' | |
| fi |
If we adopt this, '{'"$fmt"'}' should be expanded in the actual code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes plenty of sense && done
This is a retry of #1425.
Uses a different approach to let
menu-completeonly append a space if all alternatives allow this.